<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sex')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input type="radio" id="c-sex" name="row[sex]" value="男" {if $row.sex=='男'} checked {/if} >男
            <input type="radio" id="c-sex" name="row[sex]" value="女" {if $row.sex=='女'} checked {/if} >女

        </div>
    </div>    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Card')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-card" data-rule="required" class="form-control" name="row[card]" type="text" value="{$row.card|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-phone" data-rule="required" class="form-control" name="row[phone]" type="text" value="{$row.phone|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Parphone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-parphone" data-rule="required" class="form-control" name="row[parphone]" type="text" value="{$row.parphone|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Entrytime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-entrytime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[entrytime]" type="text" value="{$row.entrytime}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-type" class="control-label col-xs-12 col-sm-2">{:__('company_id')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-type" data-rule="required" class="form-control selectpicker" name="row[company_id]">
                {foreach name="company" item="vo"}
                <option  value="{$vo.id}" {in name="$vo.id" value="$row.company_id"}selected{/in}>{$vo.name}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label for="c-pid" class="control-label col-xs-12 col-sm-2">{:__('apartment_id')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-pid" data-rule="required" class="form-control selectpicker" name="row[apartment_id]">
                <option data-type="all" value="0" selected>无</option>
                {foreach name="apartment" item="vo"}
                <option data-type="{$vo.company_id}" value="{$vo.id}" {in name="$vo.id" value="$row.apartment_id"}selected{/in}>{$vo.name}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label for="c-types" class="control-label col-xs-12 col-sm-2">{:__('school_id')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-types" data-rule="required" class="form-control selectpicker" name="row[school_id]">
                {foreach name="school" item="vo"}
                <option value="{$vo.id}" {in name="$vo.id" value="$row.school_id"}selected{/in}>{$vo.name}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label for="c-pids" class="control-label col-xs-12 col-sm-2">{:__('room_id')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-pids" data-rule="required" class="form-control selectpicker" name="row[room_id]">
                <option data-type="all" value="0" selected>无</option>
                {foreach name="room" item="vo"}
                <option class="{:$vo.id==$row.room_id||$vo.id=='all'?'':'hide'}" data-type="{$vo.school_id}" value="{$vo.id}" {in name="$vo.id" value="$row.room_id"}selected{/in}>{$vo.name}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Grade_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-grade_id" data-rule="required" data-source="grade/index" class="form-control selectpage" name="row[grade_id]" type="text" value="{$row.grade_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-score" data-rule="required" class="form-control" name="row[score]" type="text" value="{$row.score|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
